package geppetto.main;

import geppetto.moses.MosesIni;

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;


public class GenerateMosesIni {
	public static void main(String[] args) throws IOException {
		String[] phraseTableFile = args[0].split(",");
		String[] reorderingTableFile = args[1].split(",");
		String[] languageModelFile = args[2].split(",");
		String encoding = args[3];
		String mosesIniFile = args[4];
		int numberOfTranslationWeights = 5;
		if(args.length > 5){
			numberOfTranslationWeights = Integer.parseInt(args[5]);  
		}
		int numberOfReorderingWeights = 6;
		if(args.length > 6){
			numberOfReorderingWeights = Integer.parseInt(args[6]);
		}
		new MosesIni(phraseTableFile, reorderingTableFile, languageModelFile, numberOfTranslationWeights, numberOfReorderingWeights).print(new PrintStream(new File(mosesIniFile),encoding));
	}
}
